/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package astrologer.validator;

import java.math.BigInteger;
import java.security.MessageDigest;

/**
 *
 * @author Tuan Nguyen
 */
public class EncodePassword {
    public static String getEncodePassword(String password){
        try{
            
            MessageDigest md5 = MessageDigest.getInstance("MD5");
            md5.update(password.getBytes());
            BigInteger hash = new BigInteger(1, md5.digest());
            return  hash.toString(16);
        }catch(Exception ex){ex.toString();return null;}
    }
}
